package com.qf.fmall.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.math.BigDecimal;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Table(name = "shopping_cart")
public class ShoppingCartVo {
    /**
     * 主键
     */
    @Id
    @Column(name = "cart_id")
    private Integer cartId;

    /**
     * 商品ID
     */
    @Column(name = "product_id")
    private String productId;

    /**
     * skuID
     */
    @Column(name = "sku_id")
    private String skuId;

    /**
     * 用户ID
     */
    @Column(name = "user_id")
    private String userId;

    /**
     * 购物车商品数量
     */
    @Column(name = "cart_num")
    private String cartNum;

    /**
     * 添加购物车时间
     */
/*    @DateTimeFormat(pattern = "yyyy-MM-dd hh-mm-ss")
    @JsonFormat(pattern = "yyyy-MM-dd hh-mm-ss")*/
    @Column(name = "cart_time")
    private String cartTime;

    /**
     * 添加购物车时商品价格
     */
    @Column(name = "product_price")
    private BigDecimal productPrice;

    /**
     * 选择的套餐的属性
     */

    @Column(name = "sku_props")
    private String skuProps;
    private String productName;
    private String productImg;
    private String skuName;
    private Integer originalPrice;
    private Integer sellPrice;
    private Integer stock;


}